\section{Active control}

\begin{frame}{\thesection.\ \insertsection}
In the preceding chapter, we have examined passive means of stabilization.
\begin{itemize}
    \item That is, making use of the natural spacecraft dynamics to obtain stability.
    \item Unfortunately, \textcolor{blue}{the attitude accuracy that can be obtained by this method is not very high, and the disturbance torques on the spacecraft can cause it to deteriorate overtime}.
\end{itemize}
\vspace{12pt}
For example, flight experience with the Radio Astronomy Explorer (RAE) satellite, which is gravity-gradient stabilized, found that the spacecraft pitch was able to stay within $\pm20$ degrees. \\
\vspace{12pt}
For certain types of missions (such that RAE), this kind of accuracy is acceptable.
\end{frame}

\begin{frame}{\thesection.\ \insertsection}
However, in many other applications (for example, space astronomy missions) the attitude accuracy requirements are very stringent. To be able to achieve such accuracy, \textcolor{blue}{an active attitude control system} is needed. \\
\vspace{12pt}
This is not to say that we have studied in terms of passive stabilization is not useful.
\begin{itemize}
    \item On the contrary, it is very useful to design a spacecraft that has passive stability (if possible), and then augment this with an active control scheme.
    \item Since the spacecraft attitude has natural stability, the control system does not need to work as hard to maintain the required attitude.
    \item It also means that the attitude remains stable if the control system fails.
\end{itemize}
\end{frame}

\begin{frame}{\thesection.\ \insertsection}
An active spacecraft attitude control system consists of
\begin{enumerate}
\item attitude sensors
    \begin{itemize}
    \item[\mysquare] The attitude sensors take measurements which are used to
        compute the current spacecraft attitude and/or angular velocity.
    \end{itemize}
\item actuators
    \begin{itemize}
    \item[\mysquare] The attitude actuator supply torques to correct the difference between the measured and desired attitude.
    \end{itemize}
\item a processor
    \begin{itemize}
    \item[\mysquare] The control law is implemented as a program on the processor.
    \end{itemize}
\end{enumerate}
\begin{block}{A control law}
    The mathematical relationship between the measured attitude and the corrective torques is called a control law.
\end{block}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Actuators}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
As we have already seen, active control requires actuators that can impart a torque to the spacecraft. \\
There are a number of different types of actuators. The actuators can be divided into two separate classes:
\begin{enumerate}
\item reactive-type actuators
    \begin{itemize}
    \item[\mysquare] Thrusters and magnetic torques are reaction-type actuators.
    \item[\mysquare] Generate torques that can be considered to be external to the spacecraft.
    \item[\mysquare] As such, reaction-type actuators have the ability to change the spacecraft angular momentum.
    \end{itemize}
\item momentum exchange devices
    \begin{itemize}
    \item[\mysquare] Reaction wheels, control moment gyros and momentum wheels are momentum exchange devices.
    \item[\mysquare] Generate torques that can be considered to be internal to the spacecraft.
    \item[\mysquare] Do not change the overall angular momentum of the spacecraft.
    \end{itemize}
\end{enumerate}
\end{frame}

\begin{frame}[t]{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
1. Thrusters \\
\vfill
Thrusters eject mass of some form to create a force. \\
\vspace{12pt}

A thrust vector that dose not pass through the spacecraft center of mass generate a torque.
\begin{center}\includegraphics{fig_11_1.pdf}\end{center}
\begin{center}\textcolor{blue}{Figure \arabic{section}.1:} Torque on a spacecraft due to a thruster\end{center}
\vfill
\end{frame}

\begin{frame}{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
Since a thruster ejects mass, it can only provide force in one direction.
Therefore, a single thruster can only provide a torque about an axis with a single sense (either positive or negative, not both). \\
\vspace{12pt}

Two thrusters are needed in order to be able to produce both a positive and negative torque about a single axis.
\begin{center}\includegraphics{fig_11_2.pdf}\end{center}
\begin{center}\textcolor{blue}{Figure \arabic{section}.2:} Possible torques on a spacecraft due to a pair of thrusters\end{center}
\textcolor{blue}{Extending this reasoning, a minimum of six thrusters are needed to be able to produce a torque about an arbitrary axis.}
\end{frame}

\begin{frame}{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
\begin{itemize} \setlength{\itemsep}{12pt}
    \item Thruster typically have the characteristic that they operate in an on/off fashion.
    \item That is, the force exerted by a thruster (and hence the resulting torque) is always at a constant level when the thruster is switched on.
    \item Therefore, we need some means of being able to \textcolor{blue}{approximate a commanded continuously variable control torque with a series of pulses with constant magnitude.}
\end{itemize}
\end{frame}

\begin{frame}[t]{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
\vspace{-6pt}
Pulse Width Modulation (PWM) has the ability to approximate a continuously variable control torque by a series of pulses.
\vspace{-6pt}
\begin{center}\includegraphics[scale=0.1]{fig_11_3.png}\end{center}
\vspace{-15pt}
\begin{center}\textcolor{blue}{Figure \arabic{section}.3:} Pulse width modulation of a thruster\end{center}
\vspace{-9pt}
PWM realizes the commanded control torque on average using a thruster that generates a torque with level \(\overline{T}_t\) when switch on, the length of time for which the thruster is switched on \(t_{p,k}\) (the pulse width) is computed as
\vspace{-6pt}
\[t_{p,k} = \frac{T_c(t_k)\Delta t}{\overline{T}_t}\]
where
 \(T_c(t_k)\) is the commanded control torque at sample instant \(t_k\),
 \(\Delta t = t_{k+1} - t_k\) is the sample period,
 \(\overline{T}_t\) is the torque constant generated by the thruster.
\end{frame}

\begin{frame}[t]{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
2. Magnetic torquers \\
\vfill
Magnetic torquers are wire coils attached to the spacecraft.
\begin{itemize}
    \item By passing a current through the coils, a magnetic dipole is created.
    \item The interaction between the coil dipole $\vec{_{}m}$ and
     the Earth's magnetic field $\vec{b}$ creates a torque according to the law:
    \[\vec{_{}T} = \vec{_{}m} \times \vec{b}\]
\end{itemize}
\vfill
\end{frame}

\begin{frame}{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
Only coarse attitude control is possible when magnetic actuation is employed exclusively.
\begin{itemize}
    \item Instantaneously underactuated
    \begin{itemize}
        \item [\scalebox{0.6}{$\blacksquare$}] The torque vector $\vec{_{}T}$ generated by a magnetic torquer is always perpendicular to the instantaneous Earth’s magnetic field vector $\vec{b}$.
        \item [\scalebox{0.6}{$\blacksquare$}]Therefore, it is impossible to generate a torque about an arbitrary axis using magnetic torquers alone.
        \item [\scalebox{0.6}{$\blacksquare$}]As such, a spacecraft equipped only with magnetic torquers is instantaneously underactuated.
    \end{itemize}
    \item Limited control authority
    \begin{itemize}
        \item [\scalebox{0.6}{$\blacksquare$}] Due to the very weak Earth magnetic field, the magnitude of the torque that can be generated by magnetic torquers is also very small, so magnetic torquers have limited control authority.
    \end{itemize}
\end{itemize}
\end{frame}

\begin{frame}[t]{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
3. Reaction wheels \\
We divide the spacecraft into a platform and the wheels.
\begin{itemize}
    \item A reaction wheel is a nominally non-spinning wheel mounted in the spacecraft.
    \item By accelerating the wheel in one direction about the wheel spin-axis, the wheel applies a reaction torque to the platform in the opposite direction (also about the wheel spin-axis).
\end{itemize}
\begin{center}\includegraphics{fig_11_4.pdf}\end{center}
\begin{center}\textcolor{blue}{Figure \arabic{section}.4:} Reaction wheel principle\end{center}
\end{frame}

\begin{frame}[t]{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
\begin{itemize}
\item There are a number of external disturbance torques acting on a spacecraft.
    \begin{itemize}
    \item[\mysquare] Magnetic torque
    \item[\mysquare] Solar radiation pressure torque
    \item[\mysquare] Aerodynamic torque
    \item[\mysquare] Gravity-gradient torque
    \end{itemize}
\item These external disturbance torques result in a change in overall spacecraft angular momentum.
\item When the spacecraft attitude is controlled using reaction wheels,
    this change in spacecraft angular momentum manifest itself as a change in stored angular momentum in the wheel.
\end{itemize}
\end{frame}

\begin{frame}[t]{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
Therefore, while reaction wheels provide the most precise attitude control, they cannot be used exclusively, since external disturbances result in a built-up of wheel angular momentum.
\vfill
\begin{block}{Momentum dumping}
Any spacecraft attitude control system utilizing reaction wheels must be augmented with reaction-type actuators (either thrusters or magnetic torquers) capable of creating torque on the spacecraft to de-load the built up angular momentum in the wheels.
\end{block}
\vfill
\end{frame}

\begin{frame}[t]{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
4. Momentum wheels \\
\vfill
Momentum wheels have a large non-zero speed.
\begin{itemize}
    \item This gives the spacecraft a bias momentum which provides gyroscopic stability.
    \item What this means is that the spacecraft will resist an external disturbance torque that attempts to turn the bias momentum vector.
    \item This is useful in the case when it is desired to keep one of the spacecraft axes inertially fixed (the axis parallel to the wheel spin axis).
\end{itemize}
\begin{center}\includegraphics{fig_11_5.pdf}\end{center}
\begin{center}\textcolor{blue}{Figure \arabic{section}.5:} Spacecraft with momentum wheel\end{center}
\end{frame}

\begin{frame}[t]{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
5. Control moment gyroscopes \\
\vfill
Control moment gyroscopes (CMG) are like momentum wheels, except the wheel spin-axis is gimballed.
\begin{center}\includegraphics{fig_11_6.pdf}\end{center}
\begin{center}\textcolor{blue}{Figure \arabic{section}.6:} Single gimbal control moment gyroscope\end{center}
A CMG is useful when large control torques are needed.
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Typical control laws}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
\begin{block}{Control law}
The mathematical relationship between the measured attitude and the corrective torques is called a control law.
\end{block}
1. Proportional ``P'' control \\
In proportional control, the control input is just a scaling of the error signal:
\[u(t) = K_p e(t)\]
where
\begin{itemize}
    \item $u(t)$: control law
    \item $e(t) = r(t) - y(t)$: error signal
    \item $r(t)$: desired attitude
    \item $y(t)$: measured attitude
    \item $K_p > 0$: proportional gain
\end{itemize}
\end{frame}

\begin{frame}[t]{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
2. Proportional derivative ``PD'' control \\
\vfill
The PD control law is given by:
\[u(t) = K_p e(t) + K_d \dot{e}(t)\]
\begin{block}{Remark}
By adding a derivative term $K_d \dot{e}(t)$, we can add some damping to diminish the oscillatory.
\vfill
\end{block}

\end{frame}
\begin{frame}[t]{\thesection.\ \insertsection \\ \small\thesection.\thesubsection\ \insertsubsection}
3. Proportional integral derivative ``PID'' control \\
\vfill
The PID control law is given by
\[u(t) = K_p e(t) + K_i \int_{0}^{t} e(t)dt + K_d \dot{e}(t)\]
\begin{block}{Remark}
By adding an integral term $K_i \int_{0}^{t} e(t)dt$, we can add some capability of driving the error to zero in the presence of a constant disturbance.
\end{block}
\vfill
\end{frame}

\begin{frame}

\begin{center}
\large References
\end{center}

\begin{description}
\item[{[1]}]  A. H. J. de Ruiter, C. J. Damaren, J. R. Forbes, Spacecraft Dynamics and Control, an Introduction, John Wiley \& Sons Ltd, 2013.
\item[{[2]}] F. L. Markley, J. L. Crassidis, Fundamentals of Spacecraft Attitude Determination and Control, Springer, 2014.
\item[{[3]}] L. Mazzini, Flexible Spacecraft Dynamics, Control and Guidance, Springer, 2016.
\item[{[4]}] V. A. Chobotov, Spacecraft Attitude Dynamics and Control, Krieger Publishing Company, 1991.
\item[{[5]}] M. J. Sidi, Spacecraft Dynamics and Control, Cambridge University Press, 1997.
\end{description}
\end{frame}
